package cn.sunagy.security.maz.auth.server;

import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.web.bind.annotation.SessionAttributes;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@MapperScan("cn.sunagy.security.maz.auth.server.module.*.mapper")
@ComponentScan({"cn.sunagy.maz.core","cn.sunagy.security.maz.auth"})
@EnableAutoConfiguration
@EnableSwagger2Doc
@SessionAttributes("authorizationRequest")
@EnableResourceServer
@EnableAuthorizationServer
public class MazAuthServerApplication {

	public static void main(String[] args) {
		SpringApplication.run(MazAuthServerApplication.class, args);
	}
}
